package com.shop.coupon.controller;

import com.shop.common.core.domain.Result;
import com.shop.coupon.domain.Coupon;
import com.shop.coupon.domain.SkuFullReduction;
import com.shop.coupon.domain.SkuLadder;
import com.shop.coupon.service.SkuFullReductionService;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/skuPullReduction")
public class SkuFullReductionController {

    private final SkuFullReductionService skuFullReductionService;

    public SkuFullReductionController(SkuFullReductionService skuFullReductionService) {
        this.skuFullReductionService = skuFullReductionService;
    }

    @GetMapping("/skuIdFull")
    public Result<SkuFullReduction> skuIdFull(@RequestParam Integer pageNum , Integer pageSize){
        return skuFullReductionService.skuIdFull(pageNum,pageSize);
    }


    @PostMapping("/skuFullUpdateRule")
    public Result<SkuFullReduction> skuFullUpdateRule(@RequestBody SkuFullReduction skuFullReduction){
        return skuFullReductionService.skuFullUpdateRule(skuFullReduction);
    }


    @PostMapping("/skuFullInsert")
    public Result<SkuFullReduction> skuFullInsert(@RequestBody SkuFullReduction skuFullReduction){
        return skuFullReductionService.skuFullInsert(skuFullReduction);
    }

    @GetMapping("/skuFullDelete")
    public Result<SkuFullReduction> skuFullDelete(@RequestParam Long id){
        return skuFullReductionService.skuFullDelete(id);
    }

    @GetMapping("/getSkuFull")
    public Result<SkuFullReduction> getSkuFull(@RequestParam Long id){
        return skuFullReductionService.getSkuFull(id);
    }


}
